package com.lxf.project;

import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@EnableDubbo(scanBasePackages = "com.lxf.project")
@PropertySource("classpath:/spring/dubbo-consumer.properties")
@ComponentScan(value = {"com.lxf.project"})
public class ConsumerConfiguration {
    @Bean
    public ApplicationConfig applicationConfig() {
        ApplicationConfig   applicationConfig = new ApplicationConfig("dubbo-demo-annotation-consumer");
        applicationConfig.setQosPort(33331);
        return applicationConfig;
    }

}
